# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: schuay <jakob.gruber@gmail.com>
# Contributor: sezanzeb for the 4.0.0 PKGBUILD.
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=soundconverter
pkgver=4.0.3
pkgrel=7
pkgdesc='A simple sound converter application for GNOME'
arch=(any)
license=(GPL3)
url=https://soundconverter.org
depends=(desktop-file-utils
         gst-plugins-good
         gst-plugins-ugly
         gst-python
         python-gobject
         python-setuptools) # https://bugs.archlinux.org/task/71201
makedepends=(python-{build,installer,wheel}
             python-distutils-extra)
#depends=(gst-plugins-base gst-plugins-good gtk3 libnotify python-gobject)
#makedepends=(intltool python-distutils-extra)
_archive="$pkgname-$pkgver"
source=("https://launchpad.net/soundconverter/trunk/$pkgver/+download/$_archive.tar.gz")
sha256sums=('873206ff82c3dfbd397ab3d8bd76fbba847017d2ed28a20a0778eb86960cb19d')

build() {
  cd "$_archive"
  python -m build -wn
}

package() {
  cd "$_archive"
  python -m installer -d "$pkgdir" dist/*.whl
  # pacman will compile schemas via a hook once placed into /usr,
  # don't let the setup.py script do it.
  rm "$pkgdir/usr/share/glib-2.0/schemas/gschemas.compiled"
}
